package com.navi.loaddata.core.mysqlEntity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by ghost on 2018/5/14.
 */
@Entity
@Table(name = "etl_conf_d", schema = "ch_qms", catalog = "")
@IdClass(EtlConfDPK.class)
public class EtlConfD {
    private String projectName;
    private String jobGroupName;
    private String jobName;
    private int jobNo;
    private String validFlg;
    private String runFlg;
    private Timestamp runStartTimestamp;
    private Timestamp runEndTimestamp;
    private Timestamp finalEndTimestamp;
    private Timestamp etlTimestamp;
    private Integer bufferMinute;
    private Integer queryMinute;
    private Integer cronValue;
    private String cronExpression;
    private Integer countSize;
    private String shop;
    private String ope;
    private String eqpt;
    private String createUser;
    private Timestamp createTime;
    private String evtUser;
    private Timestamp evtTime;
    private Timestamp timeOutMinute;
    private String opeMsg;
    private String className;
    private String cellType;
    private String ext1;
    private String jobDsc;
    private Integer timeOut;
    private String reloadJobname;
    private String reloadJobno;
    private String opes;
    private Integer errorCnt;
    private String eqpts;
    private Integer reloadCnt;
    private Timestamp etlEndTimestamp;
    private String ext2;
    private String ext3;


    @Id
    @Column(name = "PROJECT_NAME")
    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    @Id
    @Column(name = "JOB_GROUP_NAME")
    public String getJobGroupName() {
        return jobGroupName;
    }

    public void setJobGroupName(String jobGroupName) {
        this.jobGroupName = jobGroupName;
    }

    @Id
    @Column(name = "JOB_NAME")
    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    @Id
    @Column(name = "JOB_NO")
    public int getJobNo() {
        return jobNo;
    }

    public void setJobNo(int jobNo) {
        this.jobNo = jobNo;
    }

    @Basic
    @Column(name = "VALID_FLG")
    public String getValidFlg() {
        return validFlg;
    }

    public void setValidFlg(String validFlg) {
        this.validFlg = validFlg;
    }

    @Basic
    @Column(name = "RUN_FLG")
    public String getRunFlg() {
        return runFlg;
    }

    public void setRunFlg(String runFlg) {
        this.runFlg = runFlg;
    }

    @Basic
    @Column(name = "RUN_START_TIMESTAMP")
    public Timestamp getRunStartTimestamp() {
        return runStartTimestamp;
    }

    public void setRunStartTimestamp(Timestamp runStartTimestamp) {
        this.runStartTimestamp = runStartTimestamp;
    }

    @Basic
    @Column(name = "RUN_END_TIMESTAMP")
    public Timestamp getRunEndTimestamp() {
        return runEndTimestamp;
    }

    public void setRunEndTimestamp(Timestamp runEndTimestamp) {
        this.runEndTimestamp = runEndTimestamp;
    }

    @Basic
    @Column(name = "FINAL_END_TIMESTAMP")
    public Timestamp getFinalEndTimestamp() {
        return finalEndTimestamp;
    }

    public void setFinalEndTimestamp(Timestamp finalEndTimestamp) {
        this.finalEndTimestamp = finalEndTimestamp;
    }

    @Basic
    @Column(name = "ETL_TIMESTAMP")
    public Timestamp getEtlTimestamp() {
        return etlTimestamp;
    }

    public void setEtlTimestamp(Timestamp etlTimestamp) {
        this.etlTimestamp = etlTimestamp;
    }

    @Basic
    @Column(name = "BUFFER_MINUTE")
    public Integer getBufferMinute() {
        return bufferMinute;
    }

    public void setBufferMinute(Integer bufferMinute) {
        this.bufferMinute = bufferMinute;
    }

    @Basic
    @Column(name = "QUERY_MINUTE")
    public Integer getQueryMinute() {
        return queryMinute;
    }

    public void setQueryMinute(Integer queryMinute) {
        this.queryMinute = queryMinute;
    }

    @Basic
    @Column(name = "CRON_VALUE")
    public Integer getCronValue() {
        return cronValue;
    }

    public void setCronValue(Integer cronValue) {
        this.cronValue = cronValue;
    }

    @Basic
    @Column(name = "CRON_EXPRESSION")
    public String getCronExpression() {
        return cronExpression;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    @Basic
    @Column(name = "COUNT_SIZE")
    public Integer getCountSize() {
        return countSize;
    }

    public void setCountSize(Integer countSize) {
        this.countSize = countSize;
    }

    @Basic
    @Column(name = "SHOP")
    public String getShop() {
        return shop;
    }

    public void setShop(String shop) {
        this.shop = shop;
    }

    @Basic
    @Column(name = "OPE")
    public String getOpe() {
        return ope;
    }

    public void setOpe(String ope) {
        this.ope = ope;
    }

    @Basic
    @Column(name = "EQPT")
    public String getEqpt() {
        return eqpt;
    }

    public void setEqpt(String eqpt) {
        this.eqpt = eqpt;
    }

    @Basic
    @Column(name = "CREATE_USER")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "EVT_USER")
    public String getEvtUser() {
        return evtUser;
    }

    public void setEvtUser(String evtUser) {
        this.evtUser = evtUser;
    }

    @Basic
    @Column(name = "EVT_TIME")
    public Timestamp getEvtTime() {
        return evtTime;
    }

    public void setEvtTime(Timestamp evtTime) {
        this.evtTime = evtTime;
    }

    @Basic
    @Column(name = "TIME_OUT_MINUTE")
    public Timestamp getTimeOutMinute() {
        return timeOutMinute;
    }

    public void setTimeOutMinute(Timestamp timeOutMinute) {
        this.timeOutMinute = timeOutMinute;
    }

    @Basic
    @Column(name = "OPE_MSG")
    public String getOpeMsg() {
        return opeMsg;
    }

    public void setOpeMsg(String opeMsg) {
        this.opeMsg = opeMsg;
    }

    @Basic
    @Column(name = "CLASS_NAME")
    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Basic
    @Column(name = "cell_type")
    public String getCellType() {
        return cellType;
    }

    public void setCellType(String cellType) {
        this.cellType = cellType;
    }

    @Basic
    @Column(name = "ext_1")
    public String getExt1() {
        return ext1;
    }

    public void setExt1(String ext1) {
        this.ext1 = ext1;
    }

    @Basic
    @Column(name = "JOB_DSC")
    public String getJobDsc() {
        return jobDsc;
    }

    public void setJobDsc(String jobDsc) {
        this.jobDsc = jobDsc;
    }

    @Basic
    @Column(name = "TIME_OUT")
    public Integer getTimeOut() {
        return timeOut;
    }

    public void setTimeOut(Integer timeOut) {
        this.timeOut = timeOut;
    }

    @Basic
    @Column(name = "reload_jobname")
    public String getReloadJobname() {
        return reloadJobname;
    }

    public void setReloadJobname(String reloadJobname) {
        this.reloadJobname = reloadJobname;
    }

    @Basic
    @Column(name = "reload_jobno")
    public String getReloadJobno() {
        return reloadJobno;
    }

    public void setReloadJobno(String reloadJobno) {
        this.reloadJobno = reloadJobno;
    }

    @Basic
    @Column(name = "opes")
    public String getOpes() {
        return opes;
    }

    public void setOpes(String opes) {
        this.opes = opes;
    }

    @Basic
    @Column(name = "ERROR_CNT")
    public Integer getErrorCnt() {
        return errorCnt;
    }

    public void setErrorCnt(Integer errorCnt) {
        this.errorCnt = errorCnt;
    }

    @Basic
    @Column(name = "EQPTS")
    public String getEqpts() {
        return eqpts;
    }

    public void setEqpts(String eqpts) {
        this.eqpts = eqpts;
    }

    @Basic
    @Column(name = "RELOAD_CNT")
    public Integer getReloadCnt() {
        return reloadCnt;
    }

    public void setReloadCnt(Integer reloadCnt) {
        this.reloadCnt = reloadCnt;
    }

    @Basic
    @Column(name = "ETL_END_TIMESTAMP")
    public Timestamp getEtlEndTimestamp() {
        return etlEndTimestamp;
    }

    public void setEtlEndTimestamp(Timestamp etlEndTimestamp) {
        this.etlEndTimestamp = etlEndTimestamp;
    }

    @Basic
    @Column(name = "EXT_2")
    public String getExt2() {
        return ext2;
    }

    public void setExt2(String ext2) {
        this.ext2 = ext2;
    }

    @Basic
    @Column(name = "EXT_3")
    public String getExt3() {
        return ext3;
    }

    public void setExt3(String ext3) {
        this.ext3 = ext3;
    }




    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlConfD etlConfD = (EtlConfD) o;

        if (jobNo != etlConfD.jobNo) return false;
        if (projectName != null ? !projectName.equals(etlConfD.projectName) : etlConfD.projectName != null)
            return false;
        if (jobGroupName != null ? !jobGroupName.equals(etlConfD.jobGroupName) : etlConfD.jobGroupName != null)
            return false;
        if (jobName != null ? !jobName.equals(etlConfD.jobName) : etlConfD.jobName != null) return false;
        if (validFlg != null ? !validFlg.equals(etlConfD.validFlg) : etlConfD.validFlg != null) return false;
        if (runFlg != null ? !runFlg.equals(etlConfD.runFlg) : etlConfD.runFlg != null) return false;
        if (runStartTimestamp != null ? !runStartTimestamp.equals(etlConfD.runStartTimestamp) : etlConfD.runStartTimestamp != null)
            return false;
        if (runEndTimestamp != null ? !runEndTimestamp.equals(etlConfD.runEndTimestamp) : etlConfD.runEndTimestamp != null)
            return false;
        if (finalEndTimestamp != null ? !finalEndTimestamp.equals(etlConfD.finalEndTimestamp) : etlConfD.finalEndTimestamp != null)
            return false;
        if (etlTimestamp != null ? !etlTimestamp.equals(etlConfD.etlTimestamp) : etlConfD.etlTimestamp != null)
            return false;
        if (bufferMinute != null ? !bufferMinute.equals(etlConfD.bufferMinute) : etlConfD.bufferMinute != null)
            return false;
        if (queryMinute != null ? !queryMinute.equals(etlConfD.queryMinute) : etlConfD.queryMinute != null)
            return false;
        if (cronValue != null ? !cronValue.equals(etlConfD.cronValue) : etlConfD.cronValue != null) return false;
        if (cronExpression != null ? !cronExpression.equals(etlConfD.cronExpression) : etlConfD.cronExpression != null)
            return false;
        if (countSize != null ? !countSize.equals(etlConfD.countSize) : etlConfD.countSize != null) return false;
        if (shop != null ? !shop.equals(etlConfD.shop) : etlConfD.shop != null) return false;
        if (ope != null ? !ope.equals(etlConfD.ope) : etlConfD.ope != null) return false;
        if (eqpt != null ? !eqpt.equals(etlConfD.eqpt) : etlConfD.eqpt != null) return false;
        if (createUser != null ? !createUser.equals(etlConfD.createUser) : etlConfD.createUser != null) return false;
        if (createTime != null ? !createTime.equals(etlConfD.createTime) : etlConfD.createTime != null) return false;
        if (evtUser != null ? !evtUser.equals(etlConfD.evtUser) : etlConfD.evtUser != null) return false;
        if (evtTime != null ? !evtTime.equals(etlConfD.evtTime) : etlConfD.evtTime != null) return false;
        if (timeOutMinute != null ? !timeOutMinute.equals(etlConfD.timeOutMinute) : etlConfD.timeOutMinute != null)
            return false;
        if (opeMsg != null ? !opeMsg.equals(etlConfD.opeMsg) : etlConfD.opeMsg != null) return false;
        if (className != null ? !className.equals(etlConfD.className) : etlConfD.className != null) return false;
        if (cellType != null ? !cellType.equals(etlConfD.cellType) : etlConfD.cellType != null) return false;
        if (ext1 != null ? !ext1.equals(etlConfD.ext1) : etlConfD.ext1 != null) return false;
        if (jobDsc != null ? !jobDsc.equals(etlConfD.jobDsc) : etlConfD.jobDsc != null) return false;
        if (timeOut != null ? !timeOut.equals(etlConfD.timeOut) : etlConfD.timeOut != null) return false;
        if (reloadJobname != null ? !reloadJobname.equals(etlConfD.reloadJobname) : etlConfD.reloadJobname != null)
            return false;
        if (reloadJobno != null ? !reloadJobno.equals(etlConfD.reloadJobno) : etlConfD.reloadJobno != null)
            return false;
        if (opes != null ? !opes.equals(etlConfD.opes) : etlConfD.opes != null)
            return false;
        if (errorCnt != null ? !errorCnt.equals(etlConfD.errorCnt) : etlConfD.errorCnt != null)
            return false;
        if (eqpts != null ? !eqpts.equals(etlConfD.eqpts) : etlConfD.eqpts != null)
            return false;
        if (reloadCnt != null ? !reloadCnt.equals(etlConfD.reloadCnt) : etlConfD.reloadCnt != null) return false;
        if (etlEndTimestamp != null ? !etlEndTimestamp.equals(etlConfD.etlEndTimestamp) : etlConfD.etlEndTimestamp != null) return false;
        if (ext2 != null ? !ext2.equals(etlConfD.ext2) : etlConfD.ext2 != null) return false;
        if (ext3 != null ? !ext3.equals(etlConfD.ext3) : etlConfD.ext3 != null) return false;
        return true;
    }

    @Override
    public int hashCode() {
        int result = projectName != null ? projectName.hashCode() : 0;
        result = 31 * result + (jobGroupName != null ? jobGroupName.hashCode() : 0);
        result = 31 * result + (jobName != null ? jobName.hashCode() : 0);
        result = 31 * result + jobNo;
        result = 31 * result + (validFlg != null ? validFlg.hashCode() : 0);
        result = 31 * result + (runFlg != null ? runFlg.hashCode() : 0);
        result = 31 * result + (runStartTimestamp != null ? runStartTimestamp.hashCode() : 0);
        result = 31 * result + (runEndTimestamp != null ? runEndTimestamp.hashCode() : 0);
        result = 31 * result + (finalEndTimestamp != null ? finalEndTimestamp.hashCode() : 0);
        result = 31 * result + (etlTimestamp != null ? etlTimestamp.hashCode() : 0);
        result = 31 * result + (bufferMinute != null ? bufferMinute.hashCode() : 0);
        result = 31 * result + (queryMinute != null ? queryMinute.hashCode() : 0);
        result = 31 * result + (cronValue != null ? cronValue.hashCode() : 0);
        result = 31 * result + (cronExpression != null ? cronExpression.hashCode() : 0);
        result = 31 * result + (countSize != null ? countSize.hashCode() : 0);
        result = 31 * result + (shop != null ? shop.hashCode() : 0);
        result = 31 * result + (ope != null ? ope.hashCode() : 0);
        result = 31 * result + (eqpt != null ? eqpt.hashCode() : 0);
        result = 31 * result + (createUser != null ? createUser.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (evtUser != null ? evtUser.hashCode() : 0);
        result = 31 * result + (evtTime != null ? evtTime.hashCode() : 0);
        result = 31 * result + (timeOutMinute != null ? timeOutMinute.hashCode() : 0);
        result = 31 * result + (opeMsg != null ? opeMsg.hashCode() : 0);
        result = 31 * result + (className != null ? className.hashCode() : 0);
        result = 31 * result + (cellType != null ? cellType.hashCode() : 0);
        result = 31 * result + (ext1 != null ? ext1.hashCode() : 0);
        result = 31 * result + (jobDsc != null ? jobDsc.hashCode() : 0);
        result = 31 * result + (timeOut != null ? timeOut.hashCode() : 0);
        result = 31 * result + (reloadJobname != null ? reloadJobname.hashCode() : 0);
        result = 31 * result + (reloadJobno != null ? reloadJobno.hashCode() : 0);
        result = 31 * result + (opes != null ? opes.hashCode() : 0);
        result = 31 * result + (errorCnt != null ? errorCnt.hashCode() : 0);
        result = 31 * result + (eqpts != null ? eqpts.hashCode() : 0);
        result = 31 * result + (reloadCnt != null ? reloadCnt.hashCode() : 0);
        result = 31 * result + (etlEndTimestamp != null ? etlEndTimestamp.hashCode() : 0);
        result = 31 * result + (ext2 != null ? ext2.hashCode() : 0);
        result = 31 * result + (ext3 != null ? ext3.hashCode() : 0);
        return result;
    }
}
